import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.Stack;

/**
 * @author wtcode
 * @date 2021/3/11 - 8:54
 */
public class Offer50 {


    public char firstUniqChar(String s) {
        HashMap<Character,Boolean> map = new HashMap();
        char[] chars = s.toCharArray();
        for(int i = 0 ; i < chars.length ; i++){
            map.put(s.charAt(i),!map.containsKey(s.charAt(i)));
        }
        for(char c : chars){
            if(map.get(c)) return c;
        }
        return ' ';
    }
}
